Richard G Baldwin (512) 223-4758, NRG Room 4238, Baldwin@DickBaldwin.com, http://www.austincc.edu/baldwin

INEW 2338 Advanced Java Programming

Assignment 1 for Chapter 4

Revised 11/10/04

The files that you deliver for this assignment must include a servlet file named Asg04_01.class plus all of the source code files that you compiled to produce your class files.

Click here to download a zip file containing a sample version of this assignment.  This servlet program was tested using Java SDK 1.4.2 running under WinXP on a Jakarta Tomcat version 5.0.27 server running on localhost.  The server was prepared and installed as described in lesson 679 entitled Getting Started with Jakarta Tomcat, Servlets and JSP (see http://www.dickbaldwin.com/tocadv.htm), and the study guide on Servlets and JSP.

In order for you to successfully run this servlet program on your machine, it will probably be necessary for you to have the same version of the Jakarta Tomcat server installed on your machine.

Before attempting to write the program required by this assignment, you should study lesson 679 entitled Getting Started with Jakarta Tomcat, Servlets and JSP (see http://www.dickbaldwin.com/tocadv.htm), and the study guide on Servlets and JSP.

Now for the details of this assignment.  Write the Java application described below.

When I grade your assignment, I will have the Jakarta Tomcat version 5.0.27 server running on localhost.  I will copy your file named Asg04_01.class into the directory named c:\jakarta-tomcat-5.0.27\webapps\ROOT\WEB-INF\classes.   I will access your servlet by entering the following address into my browser:

http://localhost/servlet/Asg04_01

When I do that, the browser must display the output shown in Figure 1 (for Netscape 7.2) or Figure 2 (for Internet Explorer 6.0) except that your name must appear in place of my name.

Your output must match Figure 1 or Figure 2 in every significant respect including the color, size, font, and location of the characters.  The words "Hello From" must not be in italics.  Replace my name with your name and display your name in italics.



Figure 1 Netscape output from the servlet.



Figure 2 IE output from the servlet.

-end-

File:  Asg04_01.htm